﻿var win = null;
function Popup(filename, windowname, w, h) {
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += 'resizable=0, scrollbars=0, status=0,toolbar=0, menubars=0, location=0';
  win = window.open('./'+filename, windowname, settings);
  win.window.focus();
}

